package com.csnf.controller;

import com.csnf.service.BookService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class BookController {

    @Autowired
    BookService  bookService;

    @RequestMapping("/reduceStock")
    public String reduceStock(Integer bookId){
        bookService.reduceStock(bookId);
        return "success";
    }
}
